<template>
  <div class="menu-page">
    <h2 class="menu-title">地图菜单</h2>
    <ul class="menu-list">
      <li class="menu-item" @click="goToMap">
        <span class="menu-icon">🏠</span>
        <span class="menu-text">首页</span>
      </li>
      <li class="menu-item" @click="goToCollection">
        <span class="menu-icon">⭐</span>
        <span class="menu-text">收藏</span>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'MapMenu',
  methods: {
    goToMap() {
      this.$router.push('/map')
    },
    goToCollection() {
      this.$router.push('/mapCollection')
    }
  }
}
</script>

<style scoped>
.menu-page {
  padding: 40px 20px;
  background-color: white;
  height: 100vh;
}

.menu-title {
  font-size: 24px;
  margin-bottom: 40px;
  text-align: center;
  color: #333;
}

.menu-list {
  list-style: none;
  max-width: 300px;
  margin: 0 auto;
}

.menu-item {
  padding: 20px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-item:hover {
  background-color: #f9f9f9;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-icon {
  font-size: 24px;
  width: 30px;
  text-align: center;
}

.menu-text {
  font-size: 18px;
  color: #333;
}
</style>
